home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
dev
/
basic
/
NIB1_00.lha
/
NewIconsBlitz
/
NIBExamples
/
ASCII
/
NIB_ExampleSTD.ASC
< prev
next >
Wrap
Text File
|
1999-04-28
|
2KB
|
106 lines
;
; Example of Standard image viewing ONLY! V1.00 (27/04/1999)
; (C) Robert Hutchinson 1999!
; Satanic Dreams Software 1999! [Loki^SD]
;
; Feel free to use this example any way you like ;)
;
; Please email me with any bug reports or changes please:
;
; loki@sdsoft.freeserve.co.uk
;
; This can be used as an example of forcing the use of Standard
; images even when there is both data within the icon object.
;
; Requirements:
;
; o NewIconsBlitz installed correctly (see docs)
; o The NIB_Single_Include.BB2 include (provided)
; o newicon.library (V40 preferably!) / icon.library (V39+)
;
WbToScreen 0
WBenchToFront_
XINCLUDE "/NIBIncludes/NIB_Include.BB2"
;--- Check our libraries
;
If NIBCheckLibs{}=False
NPrint "Incorrect or non-present newicon.library/icon.library!"
End
EndIf
;--- Load files
;
If NIBOpenIcon{0,"YAM:YAM"} = False Then badicon=1
If NIBOpenIcon{1,"YAM:Changes"} = False Then badicon=1
If badicon=1
NPrint "Cant load file(s)!"
End
EndIf
;--- Check the loaded data..
;
imgs0.b=STDCheckStruct{0}
imgs1.b=STDCheckStruct{1}
If imgs0=0 OR imgs1=0
NIBFreeIcon{0}
NIBFreeIcon{1}
NPrint "No Standard data!"
End
EndIf
;--- Remap the chunky data to the images...
;
STDToImages{0}
STDToImages{1}
;--- Find the largest height...
;
DefHeight1.w=STDFindHeight{0}
DefHeight2.w=STDFindHeight{1}
If DefHeight1>DefHeight2
NewDef=DefHeight1
Else
NewDef=DefHeight2
EndIf
;--- Find the widths....
;
DefWidth1.w=STDFindWidth{0}
DefWidth2.w=STDFindWidth{1}
;--- Our window....
;
Window 0,50,50,((DefWidth1+DefWidth2)+13),(NewDef*2)+13,$1000,"",0,1
DefaultOutput
;--- Draw our images...
; By this point we KNOW we have the data to draw, so no error
; check required.
;
succ.b=STDDrawImage{0,#NIB_NORMAL ,0,5,5}
succ.b=STDDrawImage{0,#NIB_SELECTED,0,5,NewDef+8}
succ.b=STDDrawImage{1,#NIB_NORMAL ,0,DefWidth1+8,5}
succ.b=STDDrawImage{1,#NIB_SELECTED,0,DefWidth1+8,NewDef+8}
;--- Wait for the mouse button hit
;
MouseWait
;--- Free the icons...
;
NIBFreeIcon{0}
NIBFreeIcon{1}
;--- Free the window..
;
CloseWindow 0
End